<html>

<head>
    <script src="https://cdn.socket.io/4.7.5/socket.io.min.js"
        integrity="sha384-2huaZvOR9iDzHqslqwpR87isEmrfxqyWOF7hr7BY6KG0+hVKLoEXMPUJw3ynWuhO"
        crossorigin="anonymous"></script>
    <script>
        const socket = io('http://localhost:3001');
        socket.emit('newMessage', { roomId: 'Cici' }, response => {
            console.log('createSocket', response);
        });
        socket.on("newMessage", () => {
            console.log(socket.id); // x8WIv7-mJelg7on_ALbx
        });
    </script>
</head>

<body></body>

</html>